<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>306</cardCount>
<cardID>68411</cardID>
<listID>83162</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>----------------------------------------------------------------------PLEASE NOTE: This “AreaCODE&TIMEfinder” has been registered with theRegister of Copyrights, Washington, D.C. by the Kinetic Press, 1991-2.------------------------------------------------------------------------ This version last modified on 1/25/92on openStackif the version ≥ 2 thenput the name of menuItem 6 of menu "File" into itemNameif the first word of itemName is "Convert" thenanswer "This stack must be converted to work properly." &&¬"Do you want to convert it now?" with "No" or "Yes"if it is "Yes" then doMenu itemNameend ifend ifgo to card "Title Card"put the short name of bg btn 1 of first card of bg "Main" into bnameif first word of bname is not "Your" thenanswer "Welcome to the Area Codes stack!" with "OK"send mouseup to button "Personalize"end ifDateChangedend openStackon idleput the long date into Todayif Today ≠ field "LastDate" of card "Title Card" then DateChangedpass idleend idleon openCardglobal DSTObservedThere-- if we are on one of the data cards, adjust the DST setting for the-- place represented by this cardif the short name of this bg is "Main" thenput GetDSTObserved(bg field "Country Code", bg field "Area/City Code")¬into DSTObservedThereend ifend openCard-------------------------------------------------------------------- Handler that is called on start or when the date changes-- It sets the global DSTSeason according to the current date------------------------------------------------------------------on DateChangedglobal DSTSeasonput the long date into Todayput Today into field "LastDate" of card "Title Card" -- store the date awayput word 1 of item 2 of Today into Monthif Month is in "May, June, July, August, September" thenput "DST" into DSTSeason -- it's summer, turn on DSTexit DateChangedelseif Month is in "November, December, January, February, March" thenput "NoDST" into DSTSeason -- it's winter, no DSTexit DateChangedend ifend if-- if we get this far, it is either April or October,-- need to check in more detailput item 1 of Today into Dayput word 2 of item 2 of Today into Dateif Month = "April" thenif Date > 7 then -- after the switch to DSTput "DST" into DSTSeasonexit DateChangedelse-- we're in the first week of April. Find out how many days-- until the next Sundayput DayToNum(Day) into DaysTilSundayif DaysTilSunday = 0 then -- Today is Sunday! DST in effectput "DST" into DSTSeasonexit DateChangedelse -- Figure out how many days left 'til the 7thput 7 - Date into DaysLeftif DaysLeft < DaysTilSunday then -- must be past the first Sundayput "DST" into DSTSeasonelse -- we are before the changeput "NoDST" into DSTSeasonend ifexit DateChangedend ifend ifend if -- End of April clause---- if we get this far, it is October--if Date < 25 then -- before the switch to NoDSTput "DST" into DSTSeasonexit DateChangedelse-- we're in the last week of October. Find out how many days-- until the next Sundayput DayToNum(Day) into DaysTilSundayif DaysTilSunday = 0 then -- Today is Sunday! NoDST in effectput "NoDST" into DSTSeasonexit DateChangedelse -- Figure out how many days left 'til the 31stput 31 - Date into DaysLeftif DaysLeft < DaysTilSunday then -- must be past the last Sundayput "NoDST" into DSTSeasonelse -- we are before the changeput "DST" into DSTSeasonend ifexit DateChangedend ifend ifput DSTSeasonend DateChanged-- This function converts the day of the week into-- the number of days until Sundayfunction DayToNum theDayif theDay = "Monday" then return 6if t